The Extended Alert Resource
NEW WITH THE APPEARANCE MANAGER
You can use an extended alert resource with the same resource ID as your alert resource to provide additional features for your alert box, including movable modal behavior, Appearance-compliant backgrounds and controls, and embedding hierarchies. The resource also gives you the option of creating a title for movable alert boxes.
An extended alert resource is a resource of type
- Note
- Alert titles are only available with Appearance version 1.0.1 and later.
'alrx'
. All extended alert resources can be marked purgeable, and they must have the same resource ID and resource file as their corresponding alert resource. Figure 4-3 shows the structure of a compiled extended alert resource.Figure 4-3 Structure of a compiled extended alert
('alrx')
resource
The compiled version of an extended alert resource contains the following elements:
- Version number. An integer specifying the version of the format of the resource.
- Alert flags. Constants specifying the alert box's Appearance features; see "Alert Feature Flag Constants".
- Reference constant. This contains any value that an application wishes to store here. For example, an application can store a number here that represents an alert box type, in order to distinguish between a number of similar alert boxes. As this information is stored in a window structure within the dialog structure, you can use
GetWRefCon
to determine this value.- Window type. If this Boolean is set to 1 (
true
), the Dialog Manager specifies an Appearance-compliant window definition ID constant directly when drawing the alert box window.- Reserved. Set to 0.
- Window title. A string representing the title of a movable alert box.